﻿using STF.Blog.Model;
using System.Linq.Expressions;

namespace STF.Blog.IRepository
{
    public interface IBaseManager<T> where T : BaseEntity,new()
    {
        public Task<int> AddAsync(T model);

        public Task<int> UpdateAsync(T model);

        public Task<int> DeleteAsync(T model);

        public Task<List<T>> GetAllAsync(T model);

        public Task<List<T>> GetChooseAsync(Expression<Func<T,bool>> whereLambda);

        public Task<T> GetById(int id);

    }
}